﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataCenter.Model.Interface;

namespace DataCenter.Provider
{
    public class ProviderFactory : IProviderFactory
    {
        private IDataCenterProvider dataCenters = null;
        public IDataCenterProvider DataCenters
        {
            get
            {
                if (dataCenters == null) dataCenters = new DataCenterProvider();
                return dataCenters;
            }
        }

        private IProvinceProvider province = null;
        public IProvinceProvider Province
        {
            get
            {
                if (province == null) province = new ProvinceProvider();
                return province;
            }
        }
        private IRegionProvider region = null;
        public IRegionProvider Region
        {
            get
            {
                if (region == null)
                {
                    region = new RegionProvider();
                }
                return region;
            }
        }

        private IShopInfoProvider shopInfo = null;
        public IShopInfoProvider ShopInfo
        {
            get
            {
                if (shopInfo == null)
                {
                    shopInfo = new ShopInfoProvider();
                }
                return shopInfo;
            }
        }

        private IShopCellProvider shopCell = null;
        public IShopCellProvider ShopCell
        {
            get
            {
                if (shopCell == null)
                {
                    shopCell = new ShopCellProvider();
                }
                return shopCell;
            }
        }

        private IDistrictProvider district = null;
        public IDistrictProvider District
        {
            get
            {
                if (district == null) district = new DistrictProvider();
                return district;
            }
        }
        private IBilltoInfProvider billtoInf = null;
        public IBilltoInfProvider BilltoInf
        {
            get
            {
                if (billtoInf == null) billtoInf = new BilltoInfProvider();
                return billtoInf;
            }
        }
        private IShippingProvider shipping = null;
        public IShippingProvider Shipping
        {
            get
            {
                if (shipping == null) shipping = new ShippingProvider();
                return shipping;
            }
        }

        private IOrderProvider order = null;
        public IOrderProvider OrderInfo
        {
            get
            {
                if (order == null) order = new OrderProvider();
                return order;
            }
        }
        private ISerialNumberCdcHistProvider serialNumberCdcHist = null;
        public ISerialNumberCdcHistProvider SerialNumberCdcHist
        {
            get
            {
                if (serialNumberCdcHist == null) serialNumberCdcHist = new SerialNumberCdcHistProvider();
                return serialNumberCdcHist;
            }
        }

        private ISerialNumberRdcHistProvider serialNumberRdcHist = null;
        public ISerialNumberRdcHistProvider SerialNumberRdcHist
        {
            get
            {
                if (serialNumberRdcHist == null) serialNumberRdcHist = new SerialNumberRdcHistProvider();
                return serialNumberRdcHist;
            }
        }

        private IOrganization organization = null;
        public IOrganization Organization
        {
            get
            {
                if (organization == null)
                {
                    organization = new OrganizationProvider();
                }
                return organization;
            }
        }
        private IModelCatProvider modelCat = null;
        public IModelCatProvider ModelCat
        {
            get
            {
                if (modelCat == null) modelCat = new ModelCatProvider();
                return modelCat;
            }
        }

        private IResponseSMSProvider responseSMS = null;
        public IResponseSMSProvider ResponseSMS
        {
            get
            {
                if (responseSMS == null) responseSMS = new ResponseSMSProvider();
                return responseSMS;
            }
        }

        private IAdhocDetailProvider adhocDetail = null;
        public IAdhocDetailProvider AdhocDetail
        {
            get
            {
                if (adhocDetail == null) adhocDetail = new AdhocDetailProvider();
                return adhocDetail;
            }
        }

        private IIncentiveAdhocProvider incentiveAdhoc = null;
        public IIncentiveAdhocProvider IncentiveAdhoc
        {
            get
            {
                if (incentiveAdhoc == null) incentiveAdhoc = new IncentiveAdhocProvider();
                return incentiveAdhoc;
            }
        }

        private IPndHistoryProvider serialNumberPndHist = null;
        public IPndHistoryProvider SerialNumberPndHist
        {
            get
            {
                if (serialNumberPndHist == null) serialNumberPndHist = new PndHistoryProvider();
                return serialNumberPndHist;
            }
        }

        private IWarrantyMasterProvider warrantyMessage = null;
        public IWarrantyMasterProvider WarrantyMaster
        {
            get
            {
                if (warrantyMessage == null) warrantyMessage = new WarrantyMasterProvider();
                return warrantyMessage;
            }
        }

        private IWarrantyHistoryProvider warrantyHistory = null;
        public IWarrantyHistoryProvider WarrantyHistory
        {
            get
            {
                if (warrantyHistory == null) warrantyHistory = new WarrantyHistoryProvider();
                return warrantyHistory;
            }
        }

        private IWarrantyMessageProvider warrantyMessage0 = null;
        public IWarrantyMessageProvider WarrantyMessage
        {
            get
            {
                if (warrantyMessage0 == null) warrantyMessage0 = new WarrantyMessageProvider();
                return warrantyMessage0;
            }
        }

        private IMessageHistoryProvider messageHistory = null;
        public IMessageHistoryProvider MessageHistory
        {
            get
            {
                if (messageHistory == null) messageHistory = new MessageHistoryProvider();
                return messageHistory;
            }
        }

        private IMessageSendProvider messageSend = null;
        public IMessageSendProvider MessageSend
        {
            get
            {
                if (messageSend == null) messageSend = new MessageSendProvider();
                return messageSend;
            }
        }

        private IShopBilltoProvider shopBillto = null;
        public IShopBilltoProvider ShopBillto
        {
            get
            {
                if (shopBillto == null) shopBillto = new ShopBilltoProvider();
                return shopBillto;
            }
        }


        private IMrpProvider mrp = null;
        public IMrpProvider Mrp
        {
            get
            {
                if (mrp == null) mrp = new MrpProvider();
                return mrp;
            }
        }
    }
}
